<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多条平滑曲线</title>
    <script src="../../echarts.min.js"></script>
</head>
<body>
    <div id="main" style="height: 400px;width: 600px;"></div>
</body>
<script>
    let mychart = echarts.init(document.getElementById("main"))
    let option = {
        title:{
            text:"销量图",
            left:"center"
        },
        xAxis:{
            type:"category",
            data:["Mon",'Tue',"Wed","Thu","Fri","Sat","Sun"]
        },
        yAxis:{
            type:"value"
        },
        legend:{
            data:["A产品销量","B产品销量","C产品销量"],
            left:"right",
            orient:"vertical"
        },
        series:[
            {
                name:"A产品销量",
                data:[550,232,311,764,1090,830,500],
                type:"line",
                smooth:true
            },
            {
                name:"B产品销量",
                data:[420,162,212,564,1360,430,580],
                type:"line",
                smooth:true
            },
            {
                name:"C产品销量",
                data:[420,122,112,464,160,130,280],
                type:"line",
                smooth:true
            }
        ]
    }
    mychart.setOption(option)
</script>
</html>